<%@ page language="java" pageEncoding="UTF-8" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<%@ taglib prefix="ta" tagdir="/WEB-INF/tags/tatags" %>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>消息附件信息</title>
    <%@ include file="/ta/inc.jsp" %>
</head>
<body class="no-scrollbar">
<ta:pageloading/>
<ta:box fit="true" heightDiff="50">
    <ta:panel id="content" key="消息附件信息" fit="true">
       <ta:datagrid id="file" fit="true" forceFitColumns="true">
           <ta:datagridItem id="fileName" key="上传文件名称" ></ta:datagridItem>
           <ta:datagridItem id="serverStorePath" key="存储服务器地址" showDetailed="true" width="200px"></ta:datagridItem>
           <ta:datagridItem id="filestoremode" key="文件存储模式" collection="FILESTOREMODE"></ta:datagridItem>
           <ta:datagridItem id="uploadsuccess" key="是否上传成功" formatter="fnUploadSuccessState" width="30px"></ta:datagridItem>
           <ta:datagridItem id="download" key="操作" formatter="fnDownLoadFile" width="20px"></ta:datagridItem>
       </ta:datagrid>
    </ta:panel>
</ta:box>
<ta:buttonLayout>
    <ta:button key="关闭" isok="true" onClick="fnCloseWin()"></ta:button>
</ta:buttonLayout>
</body>
</html>
<script type="text/javascript">
    $(document).ready(function () {
        $("body").taLayout();
    });
    //关闭窗口
    function fnCloseWin() {
        parent.Base.closeWindow("msgFiles");
    }
    //上传成功标识
    function fnUploadSuccessState(row, cell, value, columnDef, dataContext){
        if(value==1){
            return "是";
        }
        else{
            return "否";
        }
    }
    //下载
    function fnDownLoadFile(row, cell, value, columnDef, dataContext){
        var path = Base.globvar.basePath+dataContext.serverStorePath;
        return "<a href='#' download="+path+" target='_blank' >下载</a>";
    }

</script>
<%@ include file="/ta/incfooter.jsp" %>